<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script src="./index.js"></script>
<script>
	// 1- 返回的是一个Promise实例
	// 2- 接收的参数是一个非Promise实例，那么返回的Promise实例状态为成功，值为接收的参数。
	// 3- 接收的参数是一个Promise实例，那么会将接收的Promise实例返回。
	// const p1 = Promise.resolve();
	// console.log(p1);// fulfilled undefined
	
	// const p1 = Promise.resolve(1);
	// console.log(p1);// fulfilled 1
	
	// const p1 = Promise.resolve(new Promise(resolve=>resolve(200)));
	// console.log(p1);// fulfilled 200
	
	const p = new Promise(resolve=>resolve(200));
	const p1 = Promise.resolve(p);
	console.log(p1 === p);// true
</script>

</html>